import request from '@/utils/request'


/* 列表 */
export function getList (params) {
  return request({
    url: `/playlist/track/all?id=2092813489&limit=25&offset=1`,
    method: 'GET',
    params
  })
}

/* 详情 */
export function getSongUrl (params) {
  return request({
    url: `/song/url`,
    method: 'GET',
    params
  })
}
/* 检测是否可用 */
export function checkMusic (params) {
  return request({
    url: `/check/music`,
    method: 'GET',
    params
  })
}
/* banner */
export function getBanner (params) {
  return request({
    url: `/banner?type=0`,
    method: 'GET',
    params
  })
}
/* 获取推荐歌单 */
export function getPersonalized (params) {
  return request({
    url: `/personalized?limit=10`,
    method: 'GET',
    params
  })
}
/* 推荐MV */
export function getMvList (params) {
  return request({
    url: `/personalized/mv`,
    method: 'GET',
    params
  })
}
/* 搜索歌曲 */
export function searchSongs (params) {
  /* 例子keywords=海阔天空 */
  return request({
    url: `/cloudsearch`,
    method: 'GET',
    params
  })
}

/* 每日推荐 */
export function recommend (data) {
  return request({
    url: `/recommend/songs`,
    method: 'get',
    params:data
  })
}
/* 获取评论 */
export function getComment (params) {
  return request({
    url: `/comment/music`,
    method: 'GET',
    params
  })
}

